<?php
/**
 * Created by JetBrains PhpStorm.
 * User: jun
 * Date: 14-5-8
 * Time: 下午3:55
 * To change this template use File | Settings | File Templates.
 */


//参数校验
function quick_param_check($arg_req){

    //身份标记
    if(!array_key_exists("identify",$arg_req)||strlen($arg_req["identify"])<=0){
        return false;
    }

    //商家电话
    if(!array_key_exists("merchant_phone",$arg_req)||strlen($arg_req["merchant_phone"])<=0){
        return false;
    }
    if(!preg_match("/^[0-9]*$/",$arg_req["merchant_phone"])){
        return false;
    }
    return true;
}

//检查用户信息
function check_user_msg($arg_userMsg){

    if(count($arg_userMsg)<3){
        return false;
    }
    return true;
}